﻿<UserControl x:Class="Configurator"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="400">
    <StackPanel>
        <CheckBox Margin="3" IsChecked="{Binding isUseCustomDictionary,Mode=TwoWay}" Content="使用自定义字典"  />
        
        <TextBlock>自定义字典：</TextBlock>
        <ListBox  x:Name="lstDictionary" Margin="3" HorizontalContentAlignment="Stretch" 
                  Height="100" MaxHeight="256"
                  ItemsSource="{Binding Dictionary}" >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Border x:Name="border" Margin="1" CornerRadius="3" BorderThickness="1" BorderBrush="AliceBlue"  >
                        <StackPanel x:Name="stackPanel">
                            <TextBlock>简：</TextBlock>
                            <TextBlock Text="{Binding Simplified}" />
                            <TextBlock>繁：</TextBlock>
                            <TextBlock Text="{Binding Traditional}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </ListBox.ItemTemplate>  
        </ListBox>
        
        <Button x:Name="btnDelete" Content="删除" />
        <Button x:Name="btnAdd" Content="添加" />

        <TextBlock>简：</TextBlock>
        <TextBox x:Name="txtSimplified" />
        <TextBlock>繁：</TextBlock>
        <TextBox x:Name="txtTraditional" />

    </StackPanel>
</UserControl>
